﻿using DLL.NET60.DB.MS.Entity.DTO;
using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using Prism.Regions;
using DLL.NET70.Infrastructure.Prism.MVVM;
using System;
using System.Collections.Generic;
using System.Linq;
using DLL.NET70.Infrastructure.Prism;

namespace PrismModule.WorkFile.ViewModels
{
    public class PUC_WorkFileViewModel : CMVVMBase, IRegionMemberLifetime
    {
        #region navigate

        public bool KeepAlive
        {
            get
            {
                //return false;//这个的作用是，只要离开当前切面，就注销掉当前页面
                return false;//这个的作用是，只要离开当前切面，就注销掉当前页面
            }
        }

        #endregion navigate

        public PUC_WorkFileViewModel(IRegionManager regionManager,
            IEventAggregator eventAggregator,
            IApplicationCommands applicationCommands) : base(regionManager, eventAggregator, applicationCommands)
        {
        }

        #region window load

        public override void Loaded()
        {
            RegionManager.RequestNavigate("ShowWorkFileContent", "PUC_ShowWorkFile");
            RegionManager.RequestNavigate("EditWorkFileContent", "PUC_AddWorkFile");

            base.Loaded();
        }

        public override void UnLoaded()
        {
            base.UnLoaded();
        }

        #endregion window load
    }
}